<template>
  <div class="base-owner-detail">
    <div class="table w50">
      <div class="table-row-group" >
        <ul class="table-row">
          <li class="table-cell-title br0">主体代码</li>
          <li class="table-cell-content br0">{{formData.ownerNo}}</li>
          <li class="table-cell-title br0">主体名称</li>
          <li class="table-cell-content">{{formData.ownerName}}</li>
        </ul>
      </div>
      <div class="table-row-group" >
        <ul class="table-row">
          <li class="table-cell-title br0">类别</li>
          <li class="table-cell-content br0">{{replaceNull(formData.ownerTypeDisplay)}}</li>
          <li class="table-cell-title br0">注册资本（元）</li>
          <li class="table-cell-content">{{replaceNull(formData.registCapital)}}</li>
        </ul>
      </div>
      <div class="table-row-group" >
        <ul class="table-row">
          <li class="table-cell-title br0">年营业额（元）</li>
          <li class="table-cell-content br0">{{replaceNull(formData.annualTurnover)}}</li>
          <li class="table-cell-title br0">法人</li>
          <li class="table-cell-content">{{replaceNull(formData.legalPerson)}}</li>
        </ul>
      </div>
      <div class="table-row-group" >
        <ul class="table-row">
          <li class="table-cell-title br0">履约率</li>
          <li class="table-cell-content br0">{{replaceNull(formData.performRateDisplay)}}</li>
          <li class="table-cell-title br0">历史交易额（元）</li>
          <li class="table-cell-content">{{formData.totalTradeAmount}}</li>
        </ul>
      </div>
      <div class="table-row-group" >
        <ul class="table-row">
          <li class="table-cell-title br0">历史交易量（吨）</li>
          <li class="table-cell-content br0">{{formData.totalTradeVolume}}</li>
          <li class="table-cell-title br0">交易次数</li>
          <li class="table-cell-content">{{formData.totalTradeTime}}</li>
        </ul>
      </div>
      <div class="table-row-group" >
        <ul class="table-row">
          <li class="table-cell-title br0">违规次数</li>
          <li class="table-cell-content br0">{{formData.totalViolateTime}}</li>
          <li class="table-cell-title br0">MIG评级</li>
          <li class="table-cell-content">{{replaceNull(formData.migGrade)}}</li>
        </ul>
      </div>
    </div>
    <input-com :headTitle="'MIG提供参考资料'" :inputValue="formData.migReference" :isActive="false"></input-com>
  </div>
</template>
<script type="text/ecmascript-6">
  import PcDialog from 'components/dialog';
  import inputCom from 'components/input/baseTitleInput.vue';
  export default{
    props: ['ownerInfo'],
    components: {
      PcDialog, inputCom
    },
    data() {
      return {
        formData: this.ownerInfo
      };
    },
    methods: {
      // 将null替换成"-"
      replaceNull(val) {
        return val === null ? '-' : val;
      }
    }
  };
</script>
<style>
  .base-owner-detail {
    width: 958px;
  }
  .base-owner-detail .table{
    display:table;
    border-collapse:collapse;
    border:1px solid #e5e5e5;
    width:100%;
    background:#ffffff;
  }
  .base-owner-detail .table .table-row-group{
    display:table-row-group;
    width: 100%;
    border-top: 1px solid #e5e5e5;
    border-left:1px solid #e5e5e5;
  }
  .base-owner-detail .table .table-row-group .table-row{
    display:table-row;
    height: 40px;
  }
  .base-owner-detail .table .table-row-group .table-row .table-cell-title{
    display:table-cell;
    padding:0 5px;
    border-left:1px solid #e5e5e5;
    border-right:1px solid #e5e5e5;
    height: 40px;
    width: 160px;
    line-height: 40px;
    text-align:center;
    color: #4d4d4d;
  }
  .base-owner-detail .table .table-row-group .table-row .table-cell-content{
    display:table-cell;
    padding:0 5px;
    border-left:1px solid #e5e5e5;
    border-right:1px solid #e5e5e5;
    height: 40px;
    width: 320px;
    line-height: 40px;
    text-indent: 20px;
    color: #1a1a1a;
  }
  .base-owner-detail .table .table-row-group .table-row .br0{
    border-right:none;
  }
  .base-owner-detail .el-table--border td{
    border-right:1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
  }
  .base-owner-detail .table .w50 ul{
    box-sizing: border-box;
  }
  .base-owner-detail .el-table--border td div{
    color:#000;
  }
</style>
